<?php
use yii\helpers\Url;
use yii\helpers\Html;
$data = $this->context->commen();
$notice = $data['notice'];
$db = $data['db'];
$NewArticle = $data['NewArticle'];
?>
<!-- main-area-right start  -->
<div class="column-col main-area-right">
<!-- 注意 -->
<div class="column-col main-area-right">
<div class="ibox">
<div class="ibox-in">
<div class="ibox-head">
<span class="ibox-tit-text">注意</span>
</div>
<div class="ibox-body">
<ul class="notice-information">
<li>
    <?php foreach ($notice as $key => $no) {?>
        <p><?php echo $key+1;?>、<?php echo $no['config_value']?><br/><br/></p>
    <?php }?>
</li>

</ul>
</div>
</div>
</div>
</div> 

<div id="hotTag" class="ibox"><div class="ibox-in"><div class="ibox-head"><div class="ibox-tit-text">热门标签</div></div> <div class="hot-tag-box"><div class="hot-tag-boxin">
<?php foreach ($db as $key => $lable) {?>
<a class="hot-tag" href="<?= Url::to(['operate/search'])?>?lable_id=<?= Html::encode($lable['artlable_id'])?>"><?= Html::encode($lable['artlable_name'])?></a>
<?php }?>
</div></div> </div>



<div id="hotQA" class="ibox"> <div class="ibox-in"><div class="ibox-head"><div class="ibox-tit-text">热门文章</div></div><div class="ibox-body"><ul class="hot-QA-list">
<?php foreach ($NewArticle as $key => $new) {?>
<li class="item"><span class="i-index"><?= Html::encode($key+1)?></span><a style="word-break:break-all;" href="<?= Url::to(['operate/detail'])?>?article_id=<?= Html::encode($new['article_id'])?>" target="_blank"><?php
            $str = $new['article_title'];
            if(strlen($str)<13)
            {
                echo $str;
            }
            else
            {
                $num = mb_substr($str,0,13,'utf-8');
                $rrr  = str_replace($str,$num."...",$str);
                echo $rrr;
            }  
        ?></a>
        <span>阅读(<?= Html::encode($new['article_count'])?>)</span>        
</li>

<?php }?>
</ul></div></div> </div>
<div id="EX_barAdPic2" class="ibox"> <div class="bar-ad-pic"></div> </div>
</div>
<!-- main-area-right end  -->